<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org">
<head>
</head>
<body>

<div class="container">
  <span>测试下跨域的问题:</span>
  <br>
  <input type="button" onclick="wwl()" value="构建数据">
  <br>
</div>
<script src="http://localhost/js/jquery.min.js"></script>
<script>
  var dataTtkfz={};
  dataTtkfz.name = "wwl";
  dataTtkfz.age = 19;
  function wwl() {
    alert(dataTtkfz);
    $.ajax({
      type: "GET",
      contentType: "application/json",
      url: "http://172.16.211.125/cors/query",
      data: dataTtkfz,
      beforeSend: function () {
      }, success: function (result) {
        $("#result").text(result)
        $("#data").val("");
      }
    });
  }
</script>
</body>
</html>